package _17_函数式编程.Lambda._5_定义接口对选择建模;

import _17_函数式编程.Lambda.Apple;

public class AppleHeavyFormatter implements AppleFormatter{
    @Override
    public String printApple(Apple apple) {
        int weight = apple.getWeight();
        return weight >= 150 ? "重量：" + weight + "，是重苹果" : "重量：" + weight + "，是轻苹果";
    }
}
